<template>
	<view>
		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
			<block slot="backText">返回</block>
			<block slot="content">编辑地址</block>
		</cu-custom>	
		<com-addr :submit="add" :edit="edit"></com-addr>		
	</view>
</template>

<script>
	import ComAddr from './components/comaddr'
	import { EditAddr } from '@/common/api/users'
	import { mapGetters } from 'vuex'
	export default {
		name: 'editaddr',
		components: { ComAddr },
		data () {
			return {
				add: EditAddr,
				edit: {}
			}
		},
		computed: {
			...mapGetters([
				'address'
			])
		},
		onLoad(opt) {
			let item = this.address.filter(item => item.id === +opt.id)[0]
			this.edit = item
		}		
	}
</script>
